import {tableOptBtnConfig} from "../table";
import {packageDevice, packageStatus} from "@/config/common";

export default {
  "tableId": "packageType",
  "name": "安装包",
  "columns": [
    {
      label: '版本号',
      width: 100,
      children: [
        {
          key: 'version',
        },
      ]
    },
    {
      label: '设备类型',
      width: 100,
      children: [
        {
          key: 'deviceType',
        },
      ],
    },
    {
      label: '安装包',
      width: 180,
      children: [
        {
          "html": true,
          key: 'filePackage',
        },
      ],
    },
    {
      label: '状态',
      width: 80,
      children: [
        {
          key: 'statusText',
        }
      ],
    },
    {
      label: '版本描述',
      width: 100,
      children: [
        {
          key: 'changelog',
          tooltip: true
        }
        ]
    },
    {
      label: '更新时间',
      width: 100,
      children: [
        {
          updatedDate: true
        }
      ],
    },
    {
      "label": "操作",
      "operation": true,
      "width": 250,
      "children": [
        {
          "button": true,
          type: tableOptBtnConfig.package.type,
        },
        {
          "button": true,
          type: tableOptBtnConfig.edit.type,
        },
        {
          "button": true,
          type: tableOptBtnConfig.delete.type,
          class: 'hover-danger',
        }
      ]
    }
  ],
  "filters": [
    {
      "fieldType": "input",
      key: 'version',
      label: '版本号',
    },
    {
      "fieldType": "string",
      key: 'status',
      label: '版本状态',
      "options": packageStatus
    },
  ]
}
